import { DIRECTION_ENUM, DIRECTION_ORDER_ENUM, ENTITY_STATE_ENUM, ENTITY_TYPE_ENUM, TILE_TYPE_ENUM } from '../Enums';
import Level1 from './level1';
import Level2 from './level2';
import Level3 from './level3';
import Level4 from './level4';
import Level5 from './level5';
import Level6 from './level6';
import Level7 from './level7';
import Level8 from './level8';
import Level9 from './level9';
import Level10 from './level10';
import Level11 from './level11';
import Level12 from './level12';
import Level13 from './level13';
import Level14 from './level14';
import Level15 from './level15';
import Level16 from './level16';
import Level17 from './level17';
import Level18 from './level18';
import Level19 from './level19';
import Level20 from './level20';
import Level21 from './level21';

export interface IEntity {
    x: number;
    y: number;
    type: ENTITY_TYPE_ENUM;
    direction: DIRECTION_ENUM;
    state: ENTITY_STATE_ENUM;
}

export interface ISpikes {
    x: number;
    y: number;
    type: ENTITY_TYPE_ENUM,
    count: number;
}

export interface ITile {
    src: number | null;
    type: TILE_TYPE_ENUM | null;
}

export interface ILevel {
    mapInfo: ITile[][];
    enemies: IEntity[];
    player: IEntity;
    door: IEntity;
    bursts: IEntity[];
    spikes: ISpikes[];
}

const levels: Record<string, ILevel> = {
    Level1,
    Level2,
    Level3,
    Level4,
    Level5,
    Level6,
    Level7,
    Level8,
    Level9,
    Level10,
    Level11,
    Level12,
    Level13,
    Level14,
    Level15,
    Level16,
    Level17,
    Level18,
    Level19,
    Level20,
    Level21,
};

export default levels;